#pragma once
#include <osg/Vec3d>

#include "CmdHandler3.h"

class Ent;
class UCS;
class Scene;
class Copy2DHandler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE Copy2DHandler();
	~Copy2DHandler();

	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;

private:
	void removeTempObjects();

	osg::Vec3d m_start;
	osg::Vec3d m_end;
	std::vector<std::shared_ptr<Ent>> m_origins;
	UCS* m_ucs;
	std::vector<std::vector<std::shared_ptr<Ent>>> m_cloneVec;
	void drawFinish(Scene* scene);
};
